Modeling abstract types in modules with open existential types
نویسندگان
چکیده
منابع مشابه
Type Classes with Existential Types
We argue that the novel combination of type classes and existential types in a single language yields significant expressive power. We explore this combination in the context of higher-order functional languages with static typing, parametric polymorphism, algebraic data types, and Hindley-Milner type inference. Adding existential types to an existing functional language that already features t...
متن کاملVariant Ownership with Existential Types
We propose an ownership types system with existential quantification of owners, similar to the existential quantification of types in models of Java wildcards. This produces a system with variant ownership types. Using explicit existential types for variance is more expressive, less ad hoc, and easier to understand and reason about than previous solutions. Furthermore, we propose using both typ...
متن کاملFirst-class polymorphism with existential types
Abstract datatypes can be typed conveniently using existential types. Even though it is a powerful abstraction mechanism, current type inference systems based on Hindley-Milner do not allow existential types as first-class citizens – every existential type must be explicitly declared, packed, and unpacked using a data constructor. We present an extension of theMLF type system with first-class e...
متن کاملExistential Owners for Ownership Types
This paper describes a lightweight approach to adding run-time checked downcasts to a language in the presence of ownership types without the need for a run-time representation of owners. Previous systems [6] have required owners of objects to be tracked and matched at run-time which is costly in terms of memory and performance. Our proposal avoids run-time overhead to deal with owners and also...
متن کاملExistential Types for Imperative Languages
We integrate existential types into a strongly typed C-like language. In particular, we show how a bad combination of existential types, mutation, and aliasing can cause a subtle violation of type safety. We explore two independent ways to strengthen the type system to restore safety. One restricts the mutation of existential packages. The other restricts the types of aliases of existential pac...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: ACM SIGPLAN Notices
سال: 2009
ISSN: 0362-1340,1558-1160
DOI: 10.1145/1594834.1480926